const initialState = {
  websites: []
}


export default function (state = initialState, action) {
  switch (action.type) {
    case "loadWebsitesSuccess": {
      return {
        websites: action.payload
      }
    }
    case "add": {
      return {
        websites: state.websites.concat(action.payload)
      }
    }
    default: {
      return state
    }
  }
}
